package titt.server.service.listener;

public class SwitchServiceListener implements ServiceListener {

	private boolean serviceStopped = false;
	
	@Override
	public synchronized void onServiceStop() {
		serviceStopped = true;
		notifyAll();
	}

	public synchronized void waitForServiceStop() {
		try {
			while(!serviceStopped)
				wait();
		}
		catch(Exception e) {
			
		}
	}
	
}
